/**
 * @author 黄泽毅
 */

function show_chart(data1,name) {
    // 创建图表实例
    let myChart = echarts.init(document.querySelector(name));

    option = {
        tooltip: {
            trigger: 'item',
            formatter: '{a} <br/>{b} : {c} ({d}%)'
        },
        series: [
            {
                name: '数据占比',
                type: 'pie',
                radius: '70%',
                center: ['50%', '50%'],
                data: data1,
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };

    myChart.setOption(option)
}
